package com.kgis.map.geometry {
    import com.kgis.map.Map;
    import com.kgis.map.common.enum.GeoTypeEnum;
    import com.kgis.map.geometry.basetype.Extent;
    import com.kgis.map.style.IStyle;
    import flash.display.Sprite;
    import com.kgis.map.geometry.AbstractGeometry;
    import com.kgis.map.geometry.ILineGeometry;
    import com.kgis.map.geometry.PointGeometry;

    [Bindable]
    [RemoteClass(alias="com.kgis.map.model.geometry.ArcGeometry")]

    /**
     * 弧几何体
     */
    public class ArcGeometry extends AbstractGeometry implements ILineGeometry {
        /**开始点*/
        public var startPoint:PointGeometry;

        /**控制点*/
        public var controlPoint:PointGeometry;

        /**锚点*/
        public var anchorPoint:PointGeometry;

        public function ArcGeometry() {
            super();
        }

        override public function draw(sprite:Sprite, geoStyle:IStyle, map:Map):void {

        }

        override public function getExtent():Extent {
            return null;
        }

        override public function getGeometryType():int {
            return GeoTypeEnum.ARCGEOMETRY;
        }

        /**
         * 得到几何体范围
         */
        public function calculateBounds():void {
        /*			if(this.geoExtent == null)
           {
           geoExtent = new Bounds(0,0,0,0);
           geoExtent.right = -999999999;
           geoExtent.left = 999999999;
           geoExtent.top = -999999999;
           geoExtent.bottom = 999999999;
           if(startPoint.x > geoExtent.right)
           {
           geoExtent.right = startPoint.x;
           }
           if(startPoint.x <geoExtent.left)
           {
           geoExtent.left = startPoint.x;
           }
           if(startPoint.y >geoExtent.top)
           {
           geoExtent.top = startPoint.y;
           }
           if(startPoint.y <geoExtent.bottom)
           {
           geoExtent.bottom = startPoint.y;
           }

           if(anchorPoint.x > geoExtent.right)
           {
           geoExtent.right = anchorPoint.x;
           }
           if(anchorPoint.x <geoExtent.left)
           {
           geoExtent.left = anchorPoint.x;
           }
           if(anchorPoint.y >geoExtent.top)
           {
           geoExtent.top = anchorPoint.y;
           }
           if(anchorPoint.y <geoExtent.bottom)
           {
           geoExtent.bottom = anchorPoint.y;
           }

           if(controlPoint.x > geoExtent.right)
           {
           geoExtent.right = controlPoint.x;
           }
           if(controlPoint.x <geoExtent.left)
           {
           geoExtent.left = controlPoint.x;
           }
           if(controlPoint.y >geoExtent.top)
           {
           geoExtent.top = controlPoint.y;
           }
           if(controlPoint.y <geoExtent.bottom)
           {
           geoExtent.bottom = controlPoint.y;
           }
           }
         return geoExtent;*/
        }
    }
}